<?php


namespace App\Http\Controllers\Api;
use App\Http\Controllers\BaseController;
use App\Lib\QiNiuAdapter;
use Dingo\Api\Http\Request;

class QiNiuController extends BaseController
{

    public function getToken(Request $request) {
        $type = $request->input('type');
        $qiniu = new QiNiuAdapter($type);
        $token = $qiniu->getToken();
        return $this->success([
            'token' => $token
        ]);
    }
}

